// JavaScript Document
function findPosX(obj)
{
	var curleft = 0;
	if (obj.offsetParent)
	{
		while (obj.offsetParent)
		{
			curleft += obj.offsetLeft
			obj = obj.offsetParent;
		}
	}
	else if (obj.x)
		curleft += obj.x;
	return curleft;
}

function findPosY(obj)
{
	var curtop = 0;
	if (obj.offsetParent)
	{
		while (obj.offsetParent)
		{
			curtop += obj.offsetTop
			obj = obj.offsetParent;
		}
	}
	else if (obj.y)
		curtop += obj.y;
	return curtop;
}

function showHideGuide(idComment, targetId, offsetTop, offsetLeft)	{
	getComment = document.getElementById(idComment);
	target = document.getElementById(targetId);	
	if (navigator.userAgent.toLowerCase().indexOf("msie") + 1)
	{
		getComment.style.top = findPosY(target) + 6 + offsetTop + "px";
		getComment.style.left = findPosX(target) + target.width - 4 + offsetLeft +"px";
	}
	else
	{
		getComment.style.top = findPosY(target) + 4 + offsetTop + "px";
		getComment.style.left = findPosX(target) + target.width + 10 + offsetLeft + "px";
	}
	if(getComment.className=='CommentShow')
	{
		getComment.className='CommentHide';
	}
	else
	{
		getComment.className='CommentShow';
	}
}

function showHideComment(idComment)	{
	getComment = document.getElementById(idComment);
	if(getComment.className=='CommentShow')
	{
		getComment.className='CommentHide';
	}
	else
	{
		getComment.className='CommentShow';
	}
}
function changeUpDown(idSort) {
	getSort = document.getElementById(idSort);
	if(getSort.className=='ActiveLinkUp')
	{
		getSort.className='ActiveLinkDown';
	}
	else
	{
		getSort.className='ActiveLinkUp'
	}
}

function showHideHelp(idHelp)	{
	getComment = document.getElementById(idHelp);
	if(getComment.className=='HelpShow')
	{
		getComment.className='HelpHide';
	}
	else
	{
		getComment.className='HelpShow';
	}
}
